package com.jajahome.model;

import androidx.annotation.NonNull;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * Created by tuxuesong on 2018/5/21.
 */

public class CrowDetailModel implements Serializable {

    /**
     * data : {"crowd_funding":[{"crowd_id":"4","item_id":"2518","name":"地毯_02.png","image":{"small":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png","thumb":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png","url":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png"},"fid_img":{"small":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png","thumb":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png","url":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png"},"fid_name":"花地毯","mid_img":{"small":"","thumb":"","url":""},"mid_name":"","size":"1800*2000","tips":"1800*2000尺寸的众筹图文","price":"250.00","price_limit":"50.00","exceed_limit":"0","order_count":"0","send_time":"0","buy_count":"0"},{"crowd_id":"4","item_id":"2518","name":"地毯_02.png","image":{"small":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png","thumb":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png","url":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png"},"fid_img":{"small":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png","thumb":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png","url":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png"},"fid_name":"花地毯","mid_img":{"small":"","thumb":"","url":""},"mid_name":"","size":"2500*2500","tips":"2500*2500尺寸的图文","price":"300.00","price_limit":"50.00","exceed_limit":"0","order_count":"0","send_time":"0","buy_count":"0"}]}
     * cmd : crowd_funding_detail
     * status : 0
     */

    private DataEntity data;
    private String cmd;
    private int status;

    public void setData(DataEntity data) {
        this.data = data;
    }

    public void setCmd(String cmd) {
        this.cmd = cmd;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public DataEntity getData() {
        return data;
    }

    public String getCmd() {
        return cmd;
    }

    public int getStatus() {
        return status;
    }

    public static class DataEntity implements Serializable {
        /**
         * crowd_funding : [{"crowd_id":"4","item_id":"2518","name":"地毯_02.png","image":{"small":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png","thumb":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png","url":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png"},"fid_img":{"small":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png","thumb":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png","url":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png"},"fid_name":"花地毯","mid_img":{"small":"","thumb":"","url":""},"mid_name":"","size":"1800*2000","tips":"1800*2000尺寸的众筹图文","price":"250.00","price_limit":"50.00","exceed_limit":"0","order_count":"0","send_time":"0","buy_count":"0"},{"crowd_id":"4","item_id":"2518","name":"地毯_02.png","image":{"small":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png","thumb":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png","url":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png"},"fid_img":{"small":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png","thumb":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png","url":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png"},"fid_name":"花地毯","mid_img":{"small":"","thumb":"","url":""},"mid_name":"","size":"2500*2500","tips":"2500*2500尺寸的图文","price":"300.00","price_limit":"50.00","exceed_limit":"0","order_count":"0","send_time":"0","buy_count":"0"}]
         */

        private List<CrowdFundingEntity> crowd_funding;

        public void setCrowd_funding(List<CrowdFundingEntity> crowd_funding) {
            this.crowd_funding = crowd_funding;
        }

        public List<CrowdFundingEntity> getCrowd_funding() {
            return crowd_funding;
        }

        public static class CrowdFundingEntity implements Serializable ,Comparable<CrowdFundingEntity>{
            /**
             * crowd_id : 4
             * item_id : 2518
             * name : 地毯_02.png
             * image : {"small":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png","thumb":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png","url":"http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png"}
             * fid_img : {"small":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png","thumb":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png","url":"http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png"}
             * fid_name : 花地毯
             * mid_img : {"small":"","thumb":"","url":""}
             * mid_name :
             * size : 1800*2000
             * tips : 1800*2000尺寸的众筹图文
             * price : 250.00
             * price_limit : 50.00
             * exceed_limit : 0
             * order_count : 0
             * send_time : 0
             * buy_count : 0
             */

            private String id;

            public String getId() {
                return id;
            }

            public void setId(String id) {
                this.id = id;
            }

            private String crowd_id;
            private String item_id;
            private String name;
            private ImageEntity image;
            private FidImgEntity fid_img;
            private String fid_name;
            private MidImgEntity mid_img;
            private String mid_name;
            private String size;
            private String tips;
            private String price;
            private String price_limit;
            private String exceed_limit;
            private String order_count;
            private String send_time;
            private String buy_count;
            private Double original;
            private String itemiTroduce;
            private String state;
            private Long countdown;

            public String getState() {
                return state;
            }

            public void setState(String state) {
                this.state = state;
            }

            public Long getCountdown() {
                return countdown;
            }

            public void setCountdown(Long countdown) {
                this.countdown = countdown;
            }

            public String getItemiTroduce() {
                return itemiTroduce;
            }

            public void setItemiTroduce(String itemiTroduce) {
                this.itemiTroduce = itemiTroduce;
            }

            public Double getOriginal() {
                return original;
            }

            public void setOriginal(Double original) {
                this.original = original;
            }

            public void setCrowd_id(String crowd_id) {
                this.crowd_id = crowd_id;
            }

            public void setItem_id(String item_id) {
                this.item_id = item_id;
            }

            public void setName(String name) {
                this.name = name;
            }

            public void setImage(ImageEntity image) {
                this.image = image;
            }

            public void setFid_img(FidImgEntity fid_img) {
                this.fid_img = fid_img;
            }

            public void setFid_name(String fid_name) {
                this.fid_name = fid_name;
            }

            public void setMid_img(MidImgEntity mid_img) {
                this.mid_img = mid_img;
            }

            public void setMid_name(String mid_name) {
                this.mid_name = mid_name;
            }

            public void setSize(String size) {
                this.size = size;
            }

            public void setTips(String tips) {
                this.tips = tips;
            }

            public void setPrice(String price) {
                this.price = price;
            }

            public void setPrice_limit(String price_limit) {
                this.price_limit = price_limit;
            }

            public void setExceed_limit(String exceed_limit) {
                this.exceed_limit = exceed_limit;
            }

            public void setOrder_count(String order_count) {
                this.order_count = order_count;
            }

            public void setSend_time(String send_time) {
                this.send_time = send_time;
            }

            public void setBuy_count(String buy_count) {
                this.buy_count = buy_count;
            }

            public String getCrowd_id() {
                return crowd_id;
            }

            public String getItem_id() {
                return item_id;
            }

            public String getName() {
                return name;
            }

            public ImageEntity getImage() {
                return image;
            }

            public FidImgEntity getFid_img() {
                return fid_img;
            }

            public String getFid_name() {
                return fid_name;
            }

            public MidImgEntity getMid_img() {
                return mid_img;
            }

            public String getMid_name() {
                return mid_name;
            }

            public String getSize() {
                return size;
            }

            public String getTips() {
                return tips;
            }

            public String getPrice() {
                return price;
            }

            public String getPrice_limit() {
                return price_limit;
            }

            public String getExceed_limit() {
                return exceed_limit;
            }

            public String getOrder_count() {
                return order_count;
            }

            public String getSend_time() {
                return send_time;
            }

            public String getBuy_count() {
                return buy_count;
            }

            @Override
            public int compareTo(@NonNull CrowdFundingEntity another) {
                int i =  new BigDecimal(Double.parseDouble(this.getPrice())).compareTo(new BigDecimal(Double.parseDouble(another.getPrice())));
                return i;
            }

            public static class ImageEntity implements Serializable {
                /**
                 * small : http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png
                 * thumb : http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png
                 * url : http://www.jajahome.com/gjj/backend/web/images/9c3/e0d/73a/912/cbf29bc58038fe2f8659.png
                 */

                private String small;
                private String thumb;
                private String url;

                public void setSmall(String small) {
                    this.small = small;
                }

                public void setThumb(String thumb) {
                    this.thumb = thumb;
                }

                public void setUrl(String url) {
                    this.url = url;
                }

                public String getSmall() {
                    return small;
                }

                public String getThumb() {
                    return thumb;
                }

                public String getUrl() {
                    return url;
                }
            }

            public static class FidImgEntity implements Serializable {
                /**
                 * small : http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png
                 * thumb : http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png
                 * url : http://www.jajahome.com/gjj/backend/web/images/bde/9df/aa5/3e5/37f5fcfd6fe5290e7c59.png
                 */

                private String small;
                private String thumb;
                private String url;

                public void setSmall(String small) {
                    this.small = small;
                }

                public void setThumb(String thumb) {
                    this.thumb = thumb;
                }

                public void setUrl(String url) {
                    this.url = url;
                }

                public String getSmall() {
                    return small;
                }

                public String getThumb() {
                    return thumb;
                }

                public String getUrl() {
                    return url;
                }
            }

            public static class MidImgEntity implements Serializable {
                /**
                 * small :
                 * thumb :
                 * url :
                 */

                private String small;
                private String thumb;
                private String url;

                public void setSmall(String small) {
                    this.small = small;
                }

                public void setThumb(String thumb) {
                    this.thumb = thumb;
                }

                public void setUrl(String url) {
                    this.url = url;
                }

                public String getSmall() {
                    return small;
                }

                public String getThumb() {
                    return thumb;
                }

                public String getUrl() {
                    return url;
                }
            }
        }
    }
}
